<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>blmc_drivers: /workspace/software/workspace/src/catkin/hardware/blmc_drivers/include/blmc_drivers/devices/can_bus.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">blmc_drivers
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('can__bus_8hpp_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">can_bus.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="can__bus_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &quot;real_time_tools/timer.hpp&quot;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &quot;real_time_tools/thread.hpp&quot;</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &quot;real_time_tools/iostream.hpp&quot;</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &quot;real_time_tools/spinner.hpp&quot;</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &quot;real_time_tools/threadsafe/threadsafe_object.hpp&quot;</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &quot;real_time_tools/threadsafe/threadsafe_timeseries.hpp&quot;</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="os__interface_8hpp.html">blmc_drivers/utils/os_interface.hpp</a>&quot;</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="device__interface_8hpp.html">blmc_drivers/devices/device_interface.hpp</a>&quot;</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceblmc__drivers.html">blmc_drivers</a></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;{</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1CanBusFrame.html">   31</a></span>&#160;<span class="keyword">class </span><a class="code" href="classblmc__drivers_1_1CanBusFrame.html">CanBusFrame</a></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;{</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1CanBusFrame.html#a1a4cd54d31de4361b003e39dfdfa4cfe">   37</a></span>&#160;    std::array&lt;uint8_t, 8&gt; <a class="code" href="classblmc__drivers_1_1CanBusFrame.html#a1a4cd54d31de4361b003e39dfdfa4cfe">data</a>;</div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1CanBusFrame.html#ab5c88f0e6fa037ace23a059a3e75b30b">   41</a></span>&#160;    uint8_t <a class="code" href="classblmc__drivers_1_1CanBusFrame.html#ab5c88f0e6fa037ace23a059a3e75b30b">dlc</a>;</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1CanBusFrame.html#a5d204dce9fded6502c7d51f3aabbad61">   45</a></span>&#160;    <a class="code" href="os__interface_8hpp.html#ab9491ad99890aa9ecf1785d1edd23d64">can_id_t</a> <a class="code" href="classblmc__drivers_1_1CanBusFrame.html#a5d204dce9fded6502c7d51f3aabbad61">id</a>;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="keywordtype">void</span> print()<span class="keyword"> const</span></div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="keyword">    </span>{</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        <a class="code" href="os__interface_8hpp.html#a1acf1ce04ab7fe3a5972c0618adcbbac">rt_printf</a>(<span class="stringliteral">&quot;---------------------------\n&quot;</span>);</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        <a class="code" href="os__interface_8hpp.html#a1acf1ce04ab7fe3a5972c0618adcbbac">rt_printf</a>(<span class="stringliteral">&quot;can bus frame data&quot;</span>);</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        <span class="keywordflow">for</span>(<span class="keyword">auto</span>&amp; datum : data)</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        {</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;            <a class="code" href="os__interface_8hpp.html#a1acf1ce04ab7fe3a5972c0618adcbbac">rt_printf</a>(<span class="stringliteral">&quot; :%d&quot;</span>, datum);</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        }</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        <a class="code" href="os__interface_8hpp.html#a1acf1ce04ab7fe3a5972c0618adcbbac">rt_printf</a>(<span class="stringliteral">&quot;\n&quot;</span>);</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <a class="code" href="os__interface_8hpp.html#a1acf1ce04ab7fe3a5972c0618adcbbac">rt_printf</a>(<span class="stringliteral">&quot;id: %d\n&quot;</span>, <span class="keywordtype">id</span>);</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <a class="code" href="os__interface_8hpp.html#a1acf1ce04ab7fe3a5972c0618adcbbac">rt_printf</a>(<span class="stringliteral">&quot;dlc: %d\n&quot;</span>, dlc);</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <a class="code" href="os__interface_8hpp.html#a1acf1ce04ab7fe3a5972c0618adcbbac">rt_printf</a>(<span class="stringliteral">&quot;---------------------------\n&quot;</span>);</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    }</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;};</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1CanBusConnection.html">   69</a></span>&#160;<span class="keyword">class </span><a class="code" href="classblmc__drivers_1_1CanBusConnection.html">CanBusConnection</a></div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;{</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1CanBusConnection.html#a9f9e0f2d59955798cfd66ed295b76797">   75</a></span>&#160;    <span class="keyword">struct </span>sockaddr_can send_addr;</div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1CanBusConnection.html#a864cc55d83145a1a54310ef5271f67ea">   79</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classblmc__drivers_1_1CanBusConnection.html#a864cc55d83145a1a54310ef5271f67ea">socket</a>;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;};</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1CanBusInterface.html">   86</a></span>&#160;<span class="keyword">class </span><a class="code" href="classblmc__drivers_1_1CanBusInterface.html">CanBusInterface</a>: <span class="keyword">public</span> <a class="code" href="classblmc__drivers_1_1DeviceInterface.html">DeviceInterface</a></div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;{</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1CanBusInterface.html#ac2c6e3ff3b49b04ad5f9f698eadc8690">   92</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="classblmc__drivers_1_1CanBusInterface.html#ac2c6e3ff3b49b04ad5f9f698eadc8690">~CanBusInterface</a>() {}</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1CanBusInterface.html#a2da2627c961927f48359ae7d7e1aa4da">   98</a></span>&#160;    <span class="keyword">typedef</span> real_time_tools::ThreadsafeTimeseries&lt;CanBusFrame&gt; <a class="code" href="classblmc__drivers_1_1CanBusInterface.html#a2da2627c961927f48359ae7d7e1aa4da">CanframeTimeseries</a>;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    <span class="keyword">virtual</span> std::shared_ptr&lt;const CanframeTimeseries&gt; get_output_frame()</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;      <span class="keyword">const</span> = 0;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <span class="keyword">virtual</span> std::shared_ptr&lt;const CanframeTimeseries&gt; get_input_frame() = 0;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <span class="keyword">virtual</span> std::shared_ptr&lt;const CanframeTimeseries&gt; get_sent_input_frame() = 0;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> set_input_frame(<span class="keyword">const</span> <a class="code" href="classblmc__drivers_1_1CanBusFrame.html">CanBusFrame</a>&amp; input_frame) = 0;</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> send_if_input_changed() = 0;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;};</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1CanBus.html">  150</a></span>&#160;<span class="keyword">class </span><a class="code" href="classblmc__drivers_1_1CanBus.html">CanBus</a>: <span class="keyword">public</span> <a class="code" href="classblmc__drivers_1_1CanBusInterface.html">CanBusInterface</a></div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;{</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    <a class="code" href="classblmc__drivers_1_1CanBus.html">CanBus</a>(<span class="keyword">const</span> std::string&amp; can_interface_name,</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;               <span class="keyword">const</span> <span class="keywordtype">size_t</span>&amp; history_length = 1000);</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="classblmc__drivers_1_1CanBus.html">CanBus</a>();</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    </div><div class="line"><a name="l00176"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1CanBus.html#a4504e6b71cba6d71de33925f9d401cb1">  176</a></span>&#160;    std::shared_ptr&lt;const CanframeTimeseries&gt; <a class="code" href="classblmc__drivers_1_1CanBus.html#a4504e6b71cba6d71de33925f9d401cb1">get_output_frame</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;<span class="keyword">    </span>{</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;        <span class="keywordflow">return</span> output_;</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    }</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;</div><div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1CanBus.html#a5b9282bc65bff196e6d6b393fbdc5891">  186</a></span>&#160;    <span class="keyword">virtual</span> std::shared_ptr&lt;const CanframeTimeseries&gt;  <a class="code" href="classblmc__drivers_1_1CanBus.html#a5b9282bc65bff196e6d6b393fbdc5891">get_input_frame</a>()</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    {</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        <span class="keywordflow">return</span> input_;</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    }</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;</div><div class="line"><a name="l00196"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1CanBus.html#a862e9898a6607ac2e00e712c30e7f348">  196</a></span>&#160;    <span class="keyword">virtual</span> std::shared_ptr&lt;const CanframeTimeseries&gt; <a class="code" href="classblmc__drivers_1_1CanBus.html#a862e9898a6607ac2e00e712c30e7f348">get_sent_input_frame</a>()</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;    {</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;        <span class="keywordflow">return</span> sent_input_;</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;    }</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;</div><div class="line"><a name="l00210"></a><span class="lineno"><a class="line" href="classblmc__drivers_1_1CanBus.html#ae4887644960c0a92fc82f8bdffbe9c48">  210</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classblmc__drivers_1_1CanBus.html#ae4887644960c0a92fc82f8bdffbe9c48">set_input_frame</a>(<span class="keyword">const</span> <a class="code" href="classblmc__drivers_1_1CanBusFrame.html">CanBusFrame</a>&amp; input_frame)</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;    {</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;        input_-&gt;append(input_frame);</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    }</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> send_if_input_changed();</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    <span class="keyword">static</span> THREAD_FUNCTION_RETURN_TYPE loop(<span class="keywordtype">void</span>* instance_pointer)</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;    {</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;        ((<a class="code" href="classblmc__drivers_1_1CanBus.html">CanBus</a>*)(instance_pointer))-&gt;loop();</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;        <span class="keywordflow">return</span> THREAD_FUNCTION_RETURN_VALUE;</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    }</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;    <span class="keywordtype">void</span> loop();</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;    <span class="keywordtype">void</span> send_frame(<span class="keyword">const</span> <a class="code" href="classblmc__drivers_1_1CanBusFrame.html">CanBusFrame</a>&amp; unstamped_can_frame);</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;    <a class="code" href="classblmc__drivers_1_1CanBusFrame.html">CanBusFrame</a> receive_frame();</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;    <a class="code" href="classblmc__drivers_1_1CanBusConnection.html">CanBusConnection</a> setup_can(std::string name, uint32_t err_mask);</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;</div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;    real_time_tools::SingletypeThreadsafeObject&lt;CanBusConnection, 1&gt; can_connection_;</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    std::shared_ptr&lt;real_time_tools::ThreadsafeTimeseries&lt;CanBusFrame&gt; &gt; input_;</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    std::shared_ptr&lt;real_time_tools::ThreadsafeTimeseries&lt;CanBusFrame&gt; &gt; sent_input_;</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;</div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;    std::shared_ptr&lt;real_time_tools::ThreadsafeTimeseries&lt;CanBusFrame&gt; &gt; output_;</div><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;</div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;    <span class="keywordtype">bool</span> is_loop_active_;</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;</div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;    real_time_tools::RealTimeThread rt_thread_;</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;</div><div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;    std::string log_dir_;</div><div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;</div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;    std::string name_;</div><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;};</div><div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;</div><div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;}</div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;</div><div class="ttc" id="classblmc__drivers_1_1CanBusConnection_html"><div class="ttname"><a href="classblmc__drivers_1_1CanBusConnection.html">blmc_drivers::CanBusConnection</a></div><div class="ttdoc">CanBusConnection is a data structure that contains the hardware details for the connection between to...</div><div class="ttdef"><b>Definition:</b> can_bus.hpp:69</div></div>
<div class="ttc" id="classblmc__drivers_1_1CanBusFrame_html"><div class="ttname"><a href="classblmc__drivers_1_1CanBusFrame.html">blmc_drivers::CanBusFrame</a></div><div class="ttdoc">CanBusFrame is a class that contains a fixed sized amount of data to be send or received via the can ...</div><div class="ttdef"><b>Definition:</b> can_bus.hpp:31</div></div>
<div class="ttc" id="classblmc__drivers_1_1CanBusFrame_html_a1a4cd54d31de4361b003e39dfdfa4cfe"><div class="ttname"><a href="classblmc__drivers_1_1CanBusFrame.html#a1a4cd54d31de4361b003e39dfdfa4cfe">blmc_drivers::CanBusFrame::data</a></div><div class="ttdeci">std::array&lt; uint8_t, 8 &gt; data</div><div class="ttdoc">data is the acutal data to be sent/received. </div><div class="ttdef"><b>Definition:</b> can_bus.hpp:37</div></div>
<div class="ttc" id="classblmc__drivers_1_1CanBusFrame_html_ab5c88f0e6fa037ace23a059a3e75b30b"><div class="ttname"><a href="classblmc__drivers_1_1CanBusFrame.html#ab5c88f0e6fa037ace23a059a3e75b30b">blmc_drivers::CanBusFrame::dlc</a></div><div class="ttdeci">uint8_t dlc</div><div class="ttdoc">dlc is the size of the message. </div><div class="ttdef"><b>Definition:</b> can_bus.hpp:41</div></div>
<div class="ttc" id="namespaceblmc__drivers_html"><div class="ttname"><a href="namespaceblmc__drivers.html">blmc_drivers</a></div><div class="ttdoc">This namespace is the standard namespace of the package. </div><div class="ttdef"><b>Definition:</b> analog_sensors.cpp:15</div></div>
<div class="ttc" id="classblmc__drivers_1_1CanBus_html_a5b9282bc65bff196e6d6b393fbdc5891"><div class="ttname"><a href="classblmc__drivers_1_1CanBus.html#a5b9282bc65bff196e6d6b393fbdc5891">blmc_drivers::CanBus::get_input_frame</a></div><div class="ttdeci">virtual std::shared_ptr&lt; const CanframeTimeseries &gt; get_input_frame()</div><div class="ttdoc">Get the input frame. </div><div class="ttdef"><b>Definition:</b> can_bus.hpp:186</div></div>
<div class="ttc" id="classblmc__drivers_1_1CanBus_html"><div class="ttname"><a href="classblmc__drivers_1_1CanBus.html">blmc_drivers::CanBus</a></div><div class="ttdoc">CanBus is the implementation of the CanBusInterface. </div><div class="ttdef"><b>Definition:</b> can_bus.hpp:150</div></div>
<div class="ttc" id="os__interface_8hpp_html_ab9491ad99890aa9ecf1785d1edd23d64"><div class="ttname"><a href="os__interface_8hpp.html#ab9491ad99890aa9ecf1785d1edd23d64">can_id_t</a></div><div class="ttdeci">canid_t can_id_t</div><div class="ttdoc">Create a common type_def to wrap xenomai and posix. </div><div class="ttdef"><b>Definition:</b> os_interface.hpp:63</div></div>
<div class="ttc" id="os__interface_8hpp_html_a1acf1ce04ab7fe3a5972c0618adcbbac"><div class="ttname"><a href="os__interface_8hpp.html#a1acf1ce04ab7fe3a5972c0618adcbbac">rt_printf</a></div><div class="ttdeci">#define rt_printf</div><div class="ttdoc">Create a common type_def to wrap xenomai and posix. </div><div class="ttdef"><b>Definition:</b> os_interface.hpp:76</div></div>
<div class="ttc" id="classblmc__drivers_1_1CanBusInterface_html_a2da2627c961927f48359ae7d7e1aa4da"><div class="ttname"><a href="classblmc__drivers_1_1CanBusInterface.html#a2da2627c961927f48359ae7d7e1aa4da">blmc_drivers::CanBusInterface::CanframeTimeseries</a></div><div class="ttdeci">real_time_tools::ThreadsafeTimeseries&lt; CanBusFrame &gt; CanframeTimeseries</div><div class="ttdoc">CanframeTimeseries is a simple sohortcut. </div><div class="ttdef"><b>Definition:</b> can_bus.hpp:98</div></div>
<div class="ttc" id="os__interface_8hpp_html"><div class="ttname"><a href="os__interface_8hpp.html">os_interface.hpp</a></div></div>
<div class="ttc" id="classblmc__drivers_1_1CanBusInterface_html"><div class="ttname"><a href="classblmc__drivers_1_1CanBusInterface.html">blmc_drivers::CanBusInterface</a></div><div class="ttdoc">CanBusInterface is an abstract class that defines an API for the communication via Can bus...</div><div class="ttdef"><b>Definition:</b> can_bus.hpp:86</div></div>
<div class="ttc" id="classblmc__drivers_1_1CanBusFrame_html_a5d204dce9fded6502c7d51f3aabbad61"><div class="ttname"><a href="classblmc__drivers_1_1CanBusFrame.html#a5d204dce9fded6502c7d51f3aabbad61">blmc_drivers::CanBusFrame::id</a></div><div class="ttdeci">can_id_t id</div><div class="ttdoc">id is the id number return by the CAN bus. </div><div class="ttdef"><b>Definition:</b> can_bus.hpp:45</div></div>
<div class="ttc" id="classblmc__drivers_1_1CanBus_html_a4504e6b71cba6d71de33925f9d401cb1"><div class="ttname"><a href="classblmc__drivers_1_1CanBus.html#a4504e6b71cba6d71de33925f9d401cb1">blmc_drivers::CanBus::get_output_frame</a></div><div class="ttdeci">std::shared_ptr&lt; const CanframeTimeseries &gt; get_output_frame() const </div><div class="ttdoc">Getters. </div><div class="ttdef"><b>Definition:</b> can_bus.hpp:176</div></div>
<div class="ttc" id="classblmc__drivers_1_1CanBusConnection_html_a864cc55d83145a1a54310ef5271f67ea"><div class="ttname"><a href="classblmc__drivers_1_1CanBusConnection.html#a864cc55d83145a1a54310ef5271f67ea">blmc_drivers::CanBusConnection::socket</a></div><div class="ttdeci">int socket</div><div class="ttdoc">socket is the port through which the messages will be processed </div><div class="ttdef"><b>Definition:</b> can_bus.hpp:79</div></div>
<div class="ttc" id="classblmc__drivers_1_1DeviceInterface_html"><div class="ttname"><a href="classblmc__drivers_1_1DeviceInterface.html">blmc_drivers::DeviceInterface</a></div><div class="ttdoc">this class exists purely for logical reasons, it does not in itself implement anything. </div><div class="ttdef"><b>Definition:</b> device_interface.hpp:36</div></div>
<div class="ttc" id="classblmc__drivers_1_1CanBusInterface_html_ac2c6e3ff3b49b04ad5f9f698eadc8690"><div class="ttname"><a href="classblmc__drivers_1_1CanBusInterface.html#ac2c6e3ff3b49b04ad5f9f698eadc8690">blmc_drivers::CanBusInterface::~CanBusInterface</a></div><div class="ttdeci">virtual ~CanBusInterface()</div><div class="ttdoc">Destroy the CanBusInterface object. </div><div class="ttdef"><b>Definition:</b> can_bus.hpp:92</div></div>
<div class="ttc" id="classblmc__drivers_1_1CanBus_html_a862e9898a6607ac2e00e712c30e7f348"><div class="ttname"><a href="classblmc__drivers_1_1CanBus.html#a862e9898a6607ac2e00e712c30e7f348">blmc_drivers::CanBus::get_sent_input_frame</a></div><div class="ttdeci">virtual std::shared_ptr&lt; const CanframeTimeseries &gt; get_sent_input_frame()</div><div class="ttdoc">Get the input frame thas has been sent. </div><div class="ttdef"><b>Definition:</b> can_bus.hpp:196</div></div>
<div class="ttc" id="classblmc__drivers_1_1CanBus_html_ae4887644960c0a92fc82f8bdffbe9c48"><div class="ttname"><a href="classblmc__drivers_1_1CanBus.html#ae4887644960c0a92fc82f8bdffbe9c48">blmc_drivers::CanBus::set_input_frame</a></div><div class="ttdeci">virtual void set_input_frame(const CanBusFrame &amp;input_frame)</div><div class="ttdoc">Setters. </div><div class="ttdef"><b>Definition:</b> can_bus.hpp:210</div></div>
<div class="ttc" id="device__interface_8hpp_html"><div class="ttname"><a href="device__interface_8hpp.html">device_interface.hpp</a></div><div class="ttdoc">License BSD-3-Clause </div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_80e6cdd9bbc895bd262b4f65e652822c.html">catkin</a></li><li class="navelem"><a class="el" href="dir_dace45749abc688185d44e8b166728a5.html">hardware</a></li><li class="navelem"><a class="el" href="dir_87d2711f33d814f4f77c208b3c1f3ba9.html">blmc_drivers</a></li><li class="navelem"><a class="el" href="dir_816dc94020a36d1af25b1f5614889f22.html">include</a></li><li class="navelem"><a class="el" href="dir_a56b819f7914f14382554b99ca83f1d8.html">blmc_drivers</a></li><li class="navelem"><a class="el" href="dir_b47d905e4c85065ffdd69d9f780e266d.html">devices</a></li><li class="navelem"><a class="el" href="can__bus_8hpp.html">can_bus.hpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
